package com.song.JavaThread_ch3_6;

import java.util.concurrent.Phaser;

public class TaskMain {
	
	
	
	public static void main(String[] args) {
		
		Phaser phaser = new Phaser(3);
		FileSearch system = new FileSearch("C:\\\\Documents and Settings\\Administrator\\桌面\\反盗版\\crawl_CMD", "java",  phaser);
		FileSearch apps = new FileSearch("C:\\\\Documents and Settings\\Administrator\\桌面\\反盗版\\Crawl_Snapshot", "java",  phaser);
		FileSearch doc = new FileSearch("C:\\\\Documents and Settings\\Administrator\\桌面\\反盗版\\dmg_res", "java",  phaser);

		Thread sthread = new Thread(system);
		sthread.start();
		
		Thread athread = new Thread(apps);
		athread.start();
		
		Thread dthread = new Thread(doc);
		dthread.start();
		
		try {
			sthread.join();
			athread.join();
			dthread.join();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
